//1.请求医院列表 所有的类型
//请求医院列表的参数中searchParams的类型
export interface getHosListSearchParamsType {
  hoscode?: string,
  hosname?: string,
  hostype?: string,
  provinceCode?: string,
  cityCode?: string,
  districtCode?: string,
  status?: 0 | 1
}

//获取医院列表的返回值中content数组中 每一条数据的类型
export interface hospitalListItemsType {
  id: string,
  createTime: string,
  updateTime: string,
  isDeleted: number,
  param: {
    hostypeString: string,
    fullAddress: string
  },
  hoscode: string,
  hosname: string,
  hostype: string,
  provinceCode: string,
  cityCode: string,
  districtCode: string,
  address: string,
  logoData: string,
  intro: string,
  route: string,
  status: 0 | 1,
  bookingRule: {
    cycle: number,
    releaseTime: string,
    stopTime: string,
    quitDay: number,
    quitTime: string,
    rule: string[]
  } | null
}

//获取医院列表请求的返回值中content的类型
export type hosListContentType = hospitalListItemsType[]

//获取医院列表请求的返回值的完整类型
export interface getHosListReqReturnType {
  content: hosListContentType,
  pageable: {
    sort: {
      sorted: boolean,
      unsorted: boolean,
      empty: boolean
    },
    pageNumber: number,
    pageSize: number,
    offset: number,
    paged: boolean,
    unpaged: boolean
  },
  totalElements: number,
  totalPages: number,
  last: boolean,
  first: boolean,
  sort: {
    sorted: boolean,
    unsorted: boolean,
    empty: boolean
  },
  numberOfElements: number,
  size: number,
  number: number,
  empty: boolean
}




//三级联动请求的数组的每一项的类型 
export interface getProvinceItemType {
  createTime: string;
  dictCode: string;
  hasChildren: boolean;
  id: number;
  isDeleted: number;
  name: string;
  param: object;
  parentId: number;
  updateTime: string;
  value: string;
}

//2.三级联动的返回值的类型
export type getThreeReturnType = getProvinceItemType[]





//获取医院列表的返回值中bookingRule的类型
export type hospitalListBookRuleType = {
  cycle: number,
  releaseTime: string,
  stopTime: string,
  quitDay: number,
  quitTime: string,
  rule: string[]
}

//3.医院列表中 医院详情请求返回值的类型
export interface getHosListDetialReqType {
  bookingRule?: hospitalListBookRuleType,
  hospital?: hospitalListItemsType
}




//获取科室数据请求返回值中每一项的类型
export interface getHosDepartmentReqItem {
  depcode: string,
  depname: string,
  children: getHosDepartmentReqType | null
}

//4.获取科室数据请求返回值类型
export type getHosDepartmentReqType = getHosDepartmentReqItem[]




//5. 某个科室的排班时间规则请求类型
//参数类型
export interface scheduleRuleParamsType {
  page: number;
  limit: number;
  hoscode: string;
  depcode: string;
}

//返回值完整类型
export interface scheduleRuleReturnType {
  total: number
  bookingScheduleList: bookingScheduleListType
  baseMap: {
    hosname: string
  };
}

// 返回值中bookingScheduleList的每一项类型
export interface bookingScheduleListItem {
  workDate: string;
  workDateMd: null;
  dayOfWeek: string;
  docCount: number;
  reservedNumber: number;
  availableNumber: number;
  status: null;
}

//返回值中bookingScheduleList的类型
export type bookingScheduleListType = bookingScheduleListItem[]




//6.获取科室排班详细信息请求参数类型
export interface findScheduleListParams {
  hoscode: string, 
  depcode: string, 
  workDate: string
}

//获取科室排班详细信息请求返回值每一项类型
export interface findScheduleListItem {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    dayOfWeek: string;
    depname: string;
    hosname: string;
  };
  hoscode: string;
  depcode: string;
  title: string;
  docname: string;
  skill: string;
  workDate: string;
  workTime: number;
  reservedNumber: number;
  availableNumber: number;
  amount: number;
  status: 0 | 1;
  hosScheduleId: string;
}

export type findScheduleListReturn = findScheduleListItem[]